{% for coeff in coefficients %}
<div class="card mb-2">
    <div class="card-body p-3">
        <h6 class="card-title mb-1">{{ coeff.name }}</h6>
        <p class="card-text small mb-1">
            <span class="me-3">气体: {{ coeff.gas_type }}</span>
            <span class="me-3">值: {{ coeff.value }}</span>
            <span>单位: {{ coeff.unit }}</span>
        </p>
        <form method="post" action="{{ url_for('factor.associate_coefficient', factor_id=factor_id) }}" class="d-inline">
            <input type="hidden" name="coefficient_id" value="{{ coeff.id }}">
            <button type="submit" class="btn btn-sm btn-outline-primary">关联</button>
        </form>
    </div>
</div>
{% else %}
<div class="alert alert-info">未找到匹配的碳排放系数</div>
{% endfor %}
